package com.ibeetl.cms.web.query;

import com.ibeetl.admin.core.annotation.Query;
import com.ibeetl.admin.core.util.Tool;
import com.ibeetl.admin.core.web.query.PageParam;
import org.apache.commons.lang3.StringUtils;

import java.util.Date;

/**
 *BusinessProcess查询
 */
public class BusinessProcessQuery extends PageParam {

    //@Query(name = "申报业务id", display = true)
    private Integer businessId;

    @Query(name = "申报业务类型", type= Query.TYPE_DICT, dict="buinessType", display = true)
    private String businessType;

    @Query(name = "处理人名称", display = true)
    private String processUserName;

    @Query(name = "处理时间", display = true, type= Query.TYPE_DATE_BETWEEN)
    private String creationDate;
    private Date createDateMin;
    private Date createDateMax;

    //@Query(name = "处理人id", display = true)
    private Integer processUserId;


    public Integer getBusinessId(){
        return  businessId;
    }
    public void setBusinessId(Integer businessId ){
        this.businessId = businessId;
    }
    public Integer getProcessUserId(){
        return  processUserId;
    }
    public void setProcessUserId(Integer processUserId ){
        this.processUserId = processUserId;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public String getProcessUserName() {
        return processUserName;
    }

    public void setProcessUserName(String processUserName) {
        this.processUserName = processUserName;
    }

    public String getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(String creationDate) {
        this.creationDate = creationDate;
        if(StringUtils.isEmpty(creationDate)) {
            return ;
        }
        Date[] ds = Tool.parseDataRange(creationDate);
        this.createDateMin=ds[0];
        this.createDateMax =ds[1];
    }

    public Date getCreateDateMin() {
        return createDateMin;
    }

    public void setCreateDateMin(Date createDateMin) {
        this.createDateMin = createDateMin;
    }

    public Date getCreateDateMax() {
        return createDateMax;
    }

    public void setCreateDateMax(Date createDateMax) {
        this.createDateMax = createDateMax;
    }
}
